/**
 * 报表设计公司(2011)
 */
package com.reportgear.designer.action.edit;

import java.util.EventObject;

import net.abbp.report.view.GridView;

import net.abbp.swing.util.ImageUtils;
import com.reportgear.designer.action.UndoableAction;

/**
 * 单元格合并
 * 
 * @version 1.0 2011-3-24
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class MergeCellAction extends UndoableAction {
	public MergeCellAction() {
		setName("合并");
		setMnemonic('M');
		setSmallIcon(ImageUtils.readIcon("edit/merge.png"));
	}

	@Override
	public boolean executeAction(EventObject evt) {
	    GridView gridView = getGridView();
		if (gridView == null) {
			return false;
		}

		gridView.mergeCell();

		return true;
	}
}
